package com.ksyun.campus.metaserver.config.metaserverconfig;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @author sxt
 * @version 1.0
 * @description TODO
 * @date 2023/8/9 21:24
 */
@Data
@ConfigurationProperties(prefix = "metaserver")
public class MetaServerConfigProperties {


    private String rootName;

    private String nodeName;

    /**
     * 数据保存根路径:
     * Windows： C:\Users\登录用户~1\AppData\Local\Temp\dataserver\node1
     * Linux： /tmp/dataserver/node1
     */
    private String dataPath = System.getProperty("java.io.tmpdir")+rootName+nodeName;

    public String getFullNode() {
        return rootName + nodeName;
    }

}
